<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRecruitTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('recruit', function (Blueprint $table) {
            $table->increments('id');
            $table->string('chinese_name')->comment('招聘网站');
            $table->string('english_name')->comment('英文名称');
            $table->string('url')->comment('招聘渠道网址');
            $table->string('contacts')->comment('联系人');
            $table->string('duties')->comment('职务');
            $table->unsignedInteger('sex')->default(3)->comment('性别 1男,2女,3不详');
            $table->string('phone')->comment('手机');
            $table->string('company_phone')->comment('公司电话');
            $table->string('email')->comment('Email');
            $table->string('company_address')->comment('公司地址');
            $table->string('area')->comment('覆盖地区');
            $table->text('brief')->comment('渠道简介');
            $table->unsignedInteger('uid')->nullable()->index()->comment('创建者ID');
            $table->tinyInteger('status')->default(1)->index()->comment('状态：-1删除，0禁用，1启用');
            $table->string('create_username')->comment('注册账号');
            $table->string('create_user_password')->comment('注册账号密码');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('recruit');
    }
}
